Optimal. Leaf size=60 \[ -\frac {x}{2 b}+\frac {\left (1-a^2\right ) \text {ArcTan}(a+b x)}{2 b^2}+\frac {1}{2} x^2 \text {ArcTan}(a+b x)+\frac {a \log \left (1+(a+b x)^2\right )}{2 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {5155, 4972, 716,
649, 209, 266} \begin {gather*} \frac {\left (1-a^2\right ) \text {ArcTan}(a+b x)}{2 b^2}+\frac {1}{2} x^2 \text {ArcTan}(a+b x)+\frac {a \log \left ((a+b x)^2+1\right )}{2 b^2}-\frac {x}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 649
Rule 716
Rule 4972
Rule 5155
Rubi steps
\begin {align*} \int x \tan ^{-1}(a+b x) \, dx &=\frac {\text {Subst}\left (\int \left (-\frac {a}{b}+\frac {x}{b}\right ) \tan ^{-1}(x) \, dx,x,a+b x\right )}{b}\\ &=\frac {1}{2} x^2 \tan ^{-1}(a+b x)-\frac {1}{2} \text {Subst}\left (\int \frac {\left (-\frac {a}{b}+\frac {x}{b}\right )^2}{1+x^2} \, dx,x,a+b x\right )\\ &=\frac {1}{2} x^2 \tan ^{-1}(a+b x)-\frac {1}{2} \text {Subst}\left (\int \left (\frac {1}{b^2}-\frac {1-a^2+2 a x}{b^2 \left (1+x^2\right )}\right ) \, dx,x,a+b x\right )\\ &=-\frac {x}{2 b}+\frac {1}{2} x^2 \tan ^{-1}(a+b x)+\frac {\text {Subst}\left (\int \frac {1-a^2+2 a x}{1+x^2} \, dx,x,a+b x\right )}{2 b^2}\\ &=-\frac {x}{2 b}+\frac {1}{2} x^2 \tan ^{-1}(a+b x)+\frac {a \text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,a+b x\right )}{b^2}+\frac {\left (1-a^2\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,a+b x\right )}{2 b^2}\\ &=-\frac {x}{2 b}+\frac {\left (1-a^2\right ) \tan ^{-1}(a+b x)}{2 b^2}+\frac {1}{2} x^2 \tan ^{-1}(a+b x)+\frac {a \log \left (1+(a+b x)^2\right )}{2 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.02, size = 90, normalized size = 1.50 \begin {gather*} \frac {-2 b x+2 b^2 x^2 \text {ArcTan}(a+b x)+i (-i+a)^2 \log (i-a-b x)+i \log (i+a+b x)+2 a \log (i+a+b x)-i a^2 \log (i+a+b x)}{4 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 63, normalized size = 1.05
method | result | size |
derivativedivides | \(\frac {\frac {\arctan \left (b x +a \right ) \left (b x +a \right )^{2}}{2}-\arctan \left (b x +a \right ) \left (b x +a \right ) a -\frac {b x}{2}-\frac {a}{2}+\frac {a \ln \left (1+\left (b x +a \right )^{2}\right )}{2}+\frac {\arctan \left (b x +a \right )}{2}}{b^{2}}\) | \(63\) |
default | \(\frac {\frac {\arctan \left (b x +a \right ) \left (b x +a \right )^{2}}{2}-\arctan \left (b x +a \right ) \left (b x +a \right ) a -\frac {b x}{2}-\frac {a}{2}+\frac {a \ln \left (1+\left (b x +a \right )^{2}\right )}{2}+\frac {\arctan \left (b x +a \right )}{2}}{b^{2}}\) | \(63\) |
risch | \(-\frac {i x^{2} \ln \left (1+i \left (b x +a \right )\right )}{4}+\frac {i x^{2} \ln \left (1-i \left (b x +a \right )\right )}{4}-\frac {a^{2} \arctan \left (b x +a \right )}{2 b^{2}}+\frac {a \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{2 b^{2}}-\frac {x}{2 b}+\frac {\arctan \left (b x +a \right )}{2 b^{2}}\) | \(91\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 68, normalized size = 1.13 \begin {gather*} \frac {1}{2} \, x^{2} \arctan \left (b x + a\right ) - \frac {1}{2} \, b {\left (\frac {x}{b^{2}} + \frac {{\left (a^{2} - 1\right )} \arctan \left (\frac {b^{2} x + a b}{b}\right )}{b^{3}} - \frac {a \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{b^{3}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.47, size = 52, normalized size = 0.87 \begin {gather*} -\frac {b x - {\left (b^{2} x^{2} - a^{2} + 1\right )} \arctan \left (b x + a\right ) - a \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{2 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.20, size = 78, normalized size = 1.30 \begin {gather*} \begin {cases} - \frac {a^{2} \operatorname {atan}{\left (a + b x \right )}}{2 b^{2}} + \frac {a \log {\left (a^{2} + 2 a b x + b^{2} x^{2} + 1 \right )}}{2 b^{2}} + \frac {x^{2} \operatorname {atan}{\left (a + b x \right )}}{2} - \frac {x}{2 b} + \frac {\operatorname {atan}{\left (a + b x \right )}}{2 b^{2}} & \text {for}\: b \neq 0 \\\frac {x^{2} \operatorname {atan}{\left (a \right )}}{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.97, size = 61, normalized size = 1.02 \begin {gather*} \frac {x^2\,\mathrm {atan}\left (a+b\,x\right )}{2}+\frac {\frac {\mathrm {atan}\left (a+b\,x\right )}{2}-\frac {b\,x}{2}-\frac {a^2\,\mathrm {atan}\left (a+b\,x\right )}{2}+\frac {a\,\ln \left (a^2+2\,a\,b\,x+b^2\,x^2+1\right )}{2}}{b^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________